import json
import time
from .gegtPublicData import *

##数据类型： ['组件1', 'dev-1', "<span  class='colorGrass'>↑75%</span>"],

def getCircleData():
    cars = list(getAllCars())
    oilData = []
    electricityData = []
    for car in cars:
        if car.energyType == '汽油':
            oilData.append([car.brandName,car.sale,car.energyType])
        elif car.energyType == '纯电动':
            electricityData.append([car.brandName, car.sale, car.energyType])
    oilData = oilData[:10]
    electricityData = electricityData[:10]

    return oilData, electricityData